﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FacultyImplementation
{
    class Group
    {
        public string groupName;

        List<Student> studentsList = new List<Student>();
        

        public void AddGroupInfo()
        {
            Console.Write("Enter group name: ");
            groupName = Console.ReadLine();
        }

        public void AddStudentsToGroup()
        {
            string select = "N";
            do
            {
                Console.WriteLine("-----Student adding-----");
                Student student = new Student();
                student.AddStudentsInfo();
                student.AddStudentsMarks();
                studentsList.Add(student);
                Console.WriteLine("Continue students adding? Y/N");
                select = Console.ReadLine().ToUpper();
            }
            while (select == "Y");
        }

        public void GroupShowInfo()
        {
            Console.WriteLine();
            Console.WriteLine("Group name: {0}", groupName);
            foreach (var students in studentsList)
            {
                students.StudentShowInfo();
            }
        }
    }
}
